import React, { Component } from "react";

export default class UseRefs extends Component {

  state = {
    arr:[2,3,4,6]
  }
  handleClick = (_index,event) => {
    console.log("index",_index);
    console.log("event",event);
    console.log("event.target",event.target);
  };
  render() {
    return (
      <ul>
          {this.state.arr.map((_item,_index) => <li key={_index} onClick={(event) => this.handleClick(_index,event)}>{_item}</li>)}
      </ul>
    );
  }
}
